<template>
  <div>
    <div class="banner">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item><img src="http://liufusong.top:8080/img/swiper/1.png" alt=""></van-swipe-item>
      <van-swipe-item><img src="http://liufusong.top:8080/img/swiper/2.png" alt=""></van-swipe-item>
      <van-swipe-item><img src="http://liufusong.top:8080/img/swiper/3.png" alt=""></van-swipe-item>
    </van-swipe>
    <div class="serch">
      <div class="toCity" @click="$router.push('/citylist')">
        <span>上海</span>
        <van-icon name="down" />
      </div>

      <input type="text" placeholder="请输入校区名字或地址">
      <div class="map"><van-icon name="location-o" size="30" color="#ccc"/></div>
    </div>
    </div>
    <van-grid :border="false" :gutter="10" :icon-size="30">
      <van-grid-item icon="wap-home-o" text="整租" />
      <van-grid-item icon="friends-o" text="合租" />
      <van-grid-item icon="location-o" text="地图找房" to='/map'/>
      <van-grid-item icon="wap-home-o" text="去出租" to='/tolet'/>
    </van-grid>
    <div class="group">
      <h3>租房小组</h3>
      <a href="">更多</a>
    </div>
    <div class="text">
      <p>家住回龙观归属的感觉</p>
      <p>宜居四五环大都市生活</p>
    </div>
    <div class="text">
      <p>喧嚣三里屯繁华的背后</p>
      <p>比邻十号线地铁心连心</p>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="less" scoped>
.my-swipe .van-swipe-item {
  color: #21b97a;
  font-size: 20px;
  line-height: 300px;
  text-align: center;
}
.banner {
  position: relative;
  width: 100%;
  height: 200px;
}
img {
   width: 100%;
  height: 200px;
}
.serch {
  position: absolute;
  top:20px;
  left: 20px;
  width: 80%;
  height: 30px;
  background-color: #fff;
}
.search {
  position: absolute;
  top:10px;
  left:60px
}
input {
  position: absolute;
  top:6px;
  left:60px;
  width: 60%;
  height: 20px;
  border: none;
}
.toCity{
  height: 30px;
  line-height: 30px;
  border: none;
  border-right: 1px solid #ccc;
}
.map {
  width: 30px;
  height: 30px;
  background-color: #fff;
  position: absolute;
  top: 2px;
  left:310px;
  border-radius: 50%;
}
.group {
  display: flex;
  justify-content: space-between;
}
h3 {
  font-size: 16px;
  margin-left: 16px;
}
a {
  display: block;
  color: #ccc;
  font-size: 16px;
  margin-top: 16px;
  margin-right: 10px;
}
.text {
  display: flex;
}
.text p {
  margin: 10px 10px;
  width: 200px;
  height: 50px;
  text-align: center;
  line-height: 50px;
  background-color: #F6F5F6;
  border-radius: 6px;
}
</style>
